Remove unnecessary clear_area method in GdkWindowImpl
authorAlexander Larsson <alexl@redhat.com>
Mon, 15 Dec 2008 13:34:52 +0000 (14:34 +0100)
committerAlexander Larsson <alex@localhost.localdomain>
Thu, 2 Apr 2009 08:15:15 +0000 (10:15 +0200)
gdk/gdkoffscreenwindow.c
gdk/gdkwindow.c
gdk/gdkwindowimpl.h
gdk/x11/gdkwindow-x11.c

index 72bb5b62c65353fa865d5b78accfecf839e10965..7f87b822bb57f0cb55c041ef43f58cb28e101d5a 100644 (file)
@@ -75,13 +75,6 @@ struct _GdkOffscreenWindowClass
 
 static void       gdk_offscreen_window_impl_iface_init    (GdkWindowImplIface         *iface);
 static void       gdk_offscreen_window_hide               (GdkWindow                  *window);
-static void       gdk_offscreen_window_clear_area         (GdkWindow                  *window,
-                                                          gint                        x,
-                                                          gint                        y,
-                                                          gint                        width,
-                                                          gint                        height,
-                                                          gboolean                    send_expose);
-
 
 G_DEFINE_TYPE_WITH_CODE (GdkOffscreenWindow,
                          gdk_offscreen_window,
@@ -961,43 +954,6 @@ setup_backing_rect_gc (GdkWindow *window, int x_offset, int y_offset)
     }
 }
 
-static void
-gdk_offscreen_window_clear_area (GdkWindow *window,
-                                gint       x,
-                                gint       y,
-                                gint       width,
-                                gint       height,
-                                gboolean   send_expose)
-{
-  GdkGC *gc;
-  
-  if (GDK_WINDOW_DESTROYED (window))
-    return;
-
-  /* Actual drawing is done by gdkwindow.c */
-
-  gc = setup_backing_rect_gc (window, 0, 0);
-  gdk_draw_rectangle (window, gc, TRUE, x, y, width, height);
-  g_object_unref (gc);
-  
-  if (send_expose)
-    {
-      GdkRectangle visible, rect;
-
-      visible.x = visible.y = 0;
-      gdk_drawable_get_size (GDK_DRAWABLE (window), &visible.width, &visible.height);
-
-      rect.x = x;
-      rect.y = x;
-      rect.width = width;
-      rect.height = height;
-
-      gdk_rectangle_intersect (&rect, &visible, &rect);
-
-      gdk_window_invalidate_rect (window, &rect, TRUE);
-    }
-}
-
 static void
 gdk_offscreen_window_set_background (GdkWindow      *window,
                                     const GdkColor *color)
@@ -1208,7 +1164,6 @@ gdk_offscreen_window_impl_iface_init (GdkWindowImplIface *iface)
   iface->set_back_pixmap = gdk_offscreen_window_set_back_pixmap;
   iface->get_events = gdk_offscreen_window_get_events;
   iface->set_events = gdk_offscreen_window_set_events;
-  iface->clear_area = gdk_offscreen_window_clear_area;
   iface->reparent = gdk_offscreen_window_reparent;
   iface->set_cursor = gdk_offscreen_window_set_cursor;
   iface->get_geometry = gdk_offscreen_window_get_geometry;
index a823e035f7c99a29e53d3eadcd61a125976cc5db..81d8dd235e9801616aeb70d53a72c229c9ab2fd6 100644 (file)
@@ -3529,8 +3529,6 @@ gdk_window_clear_area_internal (GdkWindow *window,
     {
       if (private->redirect)
        gdk_window_clear_backing_rect_redirect (window, x, y, width, height);
-
-      
       
       gdk_window_clear_backing_rect_direct (window, x, y, width, height);
       if (send_expose)
index 7ffd388b918053fb674a283dd86591d956b2b517..3509d87facd5b3494c893a7c060fc0ae770b1d46 100644 (file)
@@ -56,12 +56,6 @@ struct _GdkWindowImplIface
                                          gint             y,
                                          gint             width,
                                          gint             height);
-  void         (* clear_area)           (GdkWindow       *window,
-                                         gint             x,
-                                         gint             y,
-                                         gint             width,
-                                         gint             height,
-                                         gboolean         send_expose);
   void         (* set_background)       (GdkWindow       *window,
                                          const GdkColor  *color);
   void         (* set_back_pixmap)      (GdkWindow       *window,
index 27ab04535cb9c128b73e9fe008f51a164628a18e..86d7586807c4a513c615866daed8d3f6144c400b 100644 (file)
@@ -1669,20 +1669,6 @@ gdk_window_x11_reparent (GdkWindow *window,
   return FALSE;
 }
 
-static void
-gdk_window_x11_clear_area (GdkWindow *window,
-                           gint       x,
-                           gint       y,
-                           gint       width,
-                           gint       height,
-                           gboolean   send_expose)
-{
-  if (!GDK_WINDOW_DESTROYED (window))
-    XClearArea (GDK_WINDOW_XDISPLAY (window), GDK_WINDOW_XID (window),
-               x, y, width, height,
-                send_expose);
-}
-
 static void
 gdk_window_x11_raise (GdkWindow *window)
 {
@@ -5923,7 +5909,6 @@ gdk_window_impl_iface_init (GdkWindowImplIface *iface)
   iface->withdraw = gdk_window_x11_withdraw;
   iface->set_events = gdk_window_x11_set_events;
   iface->get_events = gdk_window_x11_get_events;
-  iface->clear_area = gdk_window_x11_clear_area;
   iface->raise = gdk_window_x11_raise;
   iface->lower = gdk_window_x11_lower;
   iface->move_resize = gdk_window_x11_move_resize;